<template>
  <div class="fail">
    <div class="main">
      <div class="status">
        <img :src="failSrc" />
        订购失败
      </div>
      <div class="btns">
        <div class="exchange" @click="onChange">返回上一页</div>
      </div>
      <div class="title">
        温馨提示：由于您的积分余额不足或者其他原因导致本次订购失败，具体情况可以咨询客服。
      </div>
    </div>
  </div>
</template>
<script>
export default {
  name: "common-fail",
  props: {
    title: String,
  },
  data() {
    return {
      failSrc: require("@/assets/img/fail.png"),
    };
  },
  methods: {
    onChange() {
      this.$router.push("home");
    },
  },
};
</script>

<style lang="less" scoped>
.fail {
  display: flex;
  flex-direction: column;
  background-color: #fff;
  border-radius: 1rem;
  .btns {
    display: flex;
    width: 100%;
    margin: 1rem 0;
    div {
      flex: 1;
      border-radius: 2rem;
      height: 4rem;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 1.4rem;
      font-weight: 600;
    }
    .exchange {
      background-color: #fac467;
      color: #fff;
    }
  }

  .main {
    padding: 0.8rem;
    box-sizing: border-box;
    .title {
      font-size: 0.8rem;
      color: #ed3332;
      width: 100%;
      text-align: left;
    }
    .status {
      font-size: 2rem;
      width: 100%;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      font-weight: 600;
      margin-bottom: 3rem;
      img {
        width: 6rem;
        height: 6rem;
        margin-bottom: 1rem;
      }
    }
  }
}
</style>
